package com.weipt.hello;

/**
 * @program: Learning
 * @description: 静态内部类,放在public类中
 * @Company: 汇华(北京)信息咨询服务有限公司
 * @author: peter.wei
 * @create: 2020-07-24 23:43
 **/
public class HelloRunnable2{
    static class MyRunnable implements Runnable{
        @Override
        public void run() {
            for (int i = 0; i < 5; i++) {
                System.out.println(Thread.currentThread().getName()+"--->"+i);
            }
        }
    }


    public static void main(String[] args) {
        MyRunnable myRunnable = new MyRunnable();
        new Thread(myRunnable).start();
        new Thread(myRunnable).start();
    }
}